﻿<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" EnableViewState="false" Inherits="EZCRS.HCMS.Web.manage.main" CodeFile="main.aspx.cs" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>EZcrs</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="/Themes/Standard/CSS/Main.css" rel="stylesheet" type="text/css" />
    <link href="/Themes/Standard/CSS/Style.css" rel="stylesheet" type="text/css" />

    <script src="../common/jquery-1.2.6.min.js"></script>

 
    <script language="javascript">

        $(document).ready(function() {
            setSize();
            $(window).resize(function() {
                setSize();
            });
        });

        function setSize() {
            var h = $(window).height();        
            if (h > 150) { $('#mainiframe').height(h - 120); }
            else { $('#maintable').height(h); }
        }

        function showmsg(str) {
            if (str == 0) {
                $('#Div_Loading').hide(200);
                $('#Div_mask').hide(200);
            }
            else {
                $('#Div_Loading').show(200);
                $('#Div_mask').show(200);
            }
        }

        function showmenu() {
            objpic = $F("SplitImg");
            if ($('#leftnav').css('display') != "none") {
                $('#leftnav').hide(200);
                objpic.src = "/Themes/Standard/Images/splitter_r.gif";
                objpic.alt = "显示菜单";
            }
            else {
                $('#leftnav').show(200);
                objpic.src = "/Themes/Standard/Images/splitter_l.gif";
                objpic.alt = "隐藏菜单";
            }
        }

        function submenu(str) {
            var leftdiv = document.getElementById("leftnav");
            var mm = leftdiv.getElementsByTagName("ul");
            for (i = 0; i < mm.length; i++) { mm[i].style.display = "none"; }
            $F("ul" + str).style.display = '';
            $('#leftnav').show(200);
        }
    </script>

</head>
<body>
    <div id="Div_Loading" style="display: none">
        <div align="center">
            <p>
                &nbsp;</p>
            <p>
                <img src="../image/loading.gif" width="20" height="20" align="absmiddle" />
                加载数据，请稍候！！</p>
        </div>
    </div>
    <div id="Div_mask" style="display: none">
    </div>
    <form id="form1" runat="server">

    <script language="javascript">
        function getdata(gid) {
            showmsg(1);
            EZCRS.HCMS.Web.manage.main.drp_group_selected(gid, data_cback);
        }
        function data_cback(response) {
            var obj = $F("drp_hotel");
            obj.length = 0;
            ds = response.value;
            for (i = 0; i < ds.Tables[0].Rows.length; i++)
                obj.options.add(new Option(ds.Tables[0].Rows[i].pid + "---" + ds.Tables[0].Rows[i].title, ds.Tables[0].Rows[i].htlid));
            obj.options.add(new Option("-选择酒店-", "0"));
            obj.value = "0";

            showmsg(0);
        }

        function chg_bas(ctype) {
            gid = "";
            if ($F("drp_group") != undefined) {
                if ($F("drp_group").length > 0)
                    gid = $F("drp_group")[$F("drp_group").selectedIndex].value;
            }
            hid = $F("drp_hotel")[$F("drp_hotel").selectedIndex].value;
            pidlist = $F("drp_hotel")[$F("drp_hotel").selectedIndex].text.split('---');
            if (pidlist.length == 2)
                pid = pidlist[0];
            else
                pid = "0";
            if (ctype == "g")
                hid = "0";
            EZCRS.HCMS.Web.manage.main.changebas(gid, hid, pid);
            //$F("mainiframe").location.reload();
            strurl = window.top.mainiframe.location.href;
            window.top.mainiframe.location.href = strurl;

        }

        //add by isaac 2011-3-22
        //set default page in mainiframe
        function loactionURL(url) {
            window.open(url, "mainiframe", "left=100,top=50,height=300,width=150,menubar=yes,toolbar=yes,location =yes,status=yes,scrollbars=yes,resizable=yes")
        }
    </script>

    <div id="mainHeader">
        <div id="headerMidL">
        </div>
        <div id="headerMidR">
            <div id="mainHtop">
                <div id="loginfo">
                    欢迎您：(<asp:Label ID="LabUserName" runat="server" CssClass="o3"></asp:Label>) &nbsp;
                      <a href='password.aspx' class="o3" target='mainiframe'><asp:Literal ID="LtlModiPass"  runat="server" Text="<%$ Resources:Site, main_password %>"></asp:Literal></a>
                    | <a href='logout.aspx' target='_top' class="o3"><asp:Literal ID="LtlLogout" runat="server" Text="<%$ Resources:Site, main_logout %>"></asp:Literal></a>
                    | <a href='/help/index.aspx' target='_top' class="o3"><asp:Literal ID="LtlHelp" runat="server" Text="<%$ Resources:Site, main_help %>"></asp:Literal></a> <%--新手上路--%>
                </div>
            </div>
            <div class="pageHeader" id="mainHmenu">
                <div   id="Div_hmenu1" runat="server"><a id="homehead" href="/manage/main.aspx?SectionID=1" onclick="javascript:loactionURL('/manage/baseinfo/zone.aspx')">酒店管理</a></div>
                <div   id="Div_hmenu2" runat="server"><a id="airhead" href="/manage/main.aspx?SectionID=2">渠道管理</a></div>
                <div id="Div_hmenu3" runat="server"><a id="zuche" href="/manage/main.aspx?SectionID=3">收益管理</a></div>
                <div id="Div_hmenu4" runat="server"><a id="BookRecordhead" href="/manage/main.aspx?SectionID=4">OTA接口</a></div>
                <div id="Div_hmenu5" runat="server"><a id="abouthead" href="/manage/main.aspx?SectionID=5">系统设置</a></div>
            </div>
        </div>
        <div class="clear">
        </div>
    </div>
    <div id="PageHeader_submenu">
        <div id="PageHeader_submenu_L" runat="server" class="submenu">
        </div>
        <div id="PageHeader_submenu_R">
            <ul>
                <li>
                    <div>
                        <asp:DropDownList ID="drp_group" runat="server" Width="90px">
                        </asp:DropDownList>
                    </div>
                </li>
                <li>
                    <div>
                        <asp:DropDownList ID="drp_hotel" runat="server" Width="150px">
                        </asp:DropDownList>
                    </div>
                </li>
            </ul>
        </div>
        <div class="clear">
        </div>
    </div>
    <table border="0" cellpadding="0" cellspacing="0" id="maintable">
        <tr>
            <td valign="top" style="background-color: #efefef;">
                <div id="leftnav">
                    <asp:Label ID="Lab_Menu2" runat="server"></asp:Label>
                </div>
            </td>
            <td class="sp_line" style="background-color: #efefef; ">
                <img alt="隐藏菜单" id="SplitImg" onclick="javascript:showmenu();" src="/Themes/Standard/Images/splitter_l.gif"
                    border="0" style="cursor: hand" />
            </td>
            <td  width="99%" valign="top" style="padding: 10px; background: #B7DBFB url('/Themes/Standard/Images/mainbg.jpg') 0 0 repeat-y;">
                <iframe src="main.htm" id="mainiframe" name="mainiframe" frameborder="0" width="100%" runat="server"
                    style="margin: 0px; margin-right: auto; " ></iframe>
            </td>
        </tr>
  
    </table>
    <div id="PageFooter">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" id="bottom_table">
                    <tr>
                        <td width="48%" align="right">
                            &nbsp;<asp:Label runat="server" ID="LabLanguage" Text="<%$ Resources:Site, main_language %>"></asp:Label>：
                        </td>
                        <td width="24%">
                            <asp:RadioButtonList ID="RblLanguage" runat="server" RepeatDirection="Horizontal"
                                AutoPostBack="True" OnSelectedIndexChanged="RblLanguage_SelectedIndexChanged">
                            </asp:RadioButtonList>
                        </td>
                        <td width="23%"">
                            <asp:Label runat="server" ID="CopyRight" Text="<%$ Resources:Site, main_copyright %>"></asp:Label>
                        </td>
                        <td align="right">
                            <img src="../image/helpicon.gif" align="absmiddle" />
                            <a href="../help/index.aspx" target="_blank">
                                <asp:Literal runat="server" ID="help" Text="<%$ Resources:Site, main_help %>"></asp:Literal></a>&nbsp;
                        </td>
                    </tr>
                </table>
    </div>
    </form>
</body>
</html>
